<?php /* Smarty version Smarty-3.1.11, created on 2013-08-23 10:23:07
         compiled from "..\templates\canbo\listcanbo.tpl" */ ?>
<?php /*%%SmartyHeaderCode:289435216d55bc01597-38900024%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1f526e1ea985b529ec89730eea893a5855905e1f' => 
    array (
      0 => '..\\templates\\canbo\\listcanbo.tpl',
      1 => 1377228180,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '289435216d55bc01597-38900024',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_5216d55bed5105_47346058',
  'variables' => 
  array (
    'thongbao' => 0,
    'ma_cb' => 0,
    'hoten_cb' => 0,
    'phanloai' => 0,
    'pl' => 0,
    'ma_plcb' => 0,
    'SL_hien' => 0,
    'sl' => 0,
    'hien' => 0,
    'list_cb' => 0,
    'i' => 0,
    'doituong' => 0,
    'page' => 0,
    'hientai' => 0,
    'url' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5216d55bed5105_47346058')) {function content_5216d55bed5105_47346058($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'C:\\xampp\\htdocs\\tuyensinh\\lib\\smarty\\plugins\\modifier.date_format.php';
?><script>
    function tim_cbgv(){
        var url="index.php?muc=canbo&modul=list_cb&tim";
        if($("#ma_cb").val()!=""){
            url=url+"&ma_cb="+$("#ma_cb").val();
        }
        if($("#hoten_cb").val()!=""){
            url=url+"&hoten_cb="+$("#hoten_cb").val();
        }
        if($("#phanloai").val()!=""){
            url=url+"&phanloai="+$("#phanloai").val();
        }
        if($("#SL_hien").val()!=""){
            url=url+"&SL_hien="+$("#SL_hien").val();
            
        }
        window.location.href=url;
    }    
</script>

<!---------------------------------------- NỘI DUNG TRANG--------------------------------------->

<div class="content-box"><!-- Start Content Box -->
	<div class="content-box-header">
		<h3>Danh Sách Cán Bộ </h3>
	</div> <!-- End .content-box-header -->	
	<div class="content-box-content"> 
        <form action="" method="POST" id="list_cb">
            <table>
                <?php echo $_smarty_tpl->tpl_vars['thongbao']->value;?>

                <tr>
                    <td colspan="10">
                        <input class="button" type="submit" name="Xoa" value="Xóa"/>
                        Mã CB: <input type="text" class="text-input" name="ma_cb"  id="ma_cb" value="<?php echo $_smarty_tpl->tpl_vars['ma_cb']->value;?>
"/>
                        Tên CB: <input type="text" class="text-input" name="hoten_cb"  id="hoten_cb" value="<?php echo $_smarty_tpl->tpl_vars['hoten_cb']->value;?>
"/>
                        <select name="phanloai" id="phanloai">
                            <option value="">--Loại CB--</option>
                            <?php  $_smarty_tpl->tpl_vars['pl'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['pl']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['phanloai']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['pl']->key => $_smarty_tpl->tpl_vars['pl']->value){
$_smarty_tpl->tpl_vars['pl']->_loop = true;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['pl']->value['ma_plcb'];?>
" <?php if ($_smarty_tpl->tpl_vars['ma_plcb']->value==$_smarty_tpl->tpl_vars['pl']->value['ma_plcb']){?> selected="" <?php }?>><?php echo $_smarty_tpl->tpl_vars['pl']->value['ten_plcb'];?>
</option>
                            <?php } ?>
                        </select>
                        <input class="button" type="button" id="tim" name="tim" value="Tìm CB - GV" onclick="tim_cbgv()"/>
                        <select name="SL_hien" id="SL_hien">
                            <?php  $_smarty_tpl->tpl_vars['sl'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sl']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['SL_hien']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['sl']->key => $_smarty_tpl->tpl_vars['sl']->value){
$_smarty_tpl->tpl_vars['sl']->_loop = true;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['sl']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['hien']->value==$_smarty_tpl->tpl_vars['sl']->value){?> selected='' <?php }?>><?php echo $_smarty_tpl->tpl_vars['sl']->value;?>
</option>
                            <?php } ?>
                        </select>
                    </td>
                </tr>
                <tr><td>STT</td>
                    <td>Mã CB</td>
                    <td>Ho tên CB</td>
                    <td>Địa Chỉ</td>
                    <td>Ngày Sinh</td>
                    <td>Điện thoại</td>
                    <td>Email</td>
                </tr>
                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
            <?php  $_smarty_tpl->tpl_vars['doituong'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['doituong']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['list_cb']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['doituong']->key => $_smarty_tpl->tpl_vars['doituong']->value){
$_smarty_tpl->tpl_vars['doituong']->_loop = true;
?>
                <tr>
                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value++;?>
</td>
                    <td><a href="index.php?muc=canbo&modul=editcanbo&ma_cb=<?php echo $_smarty_tpl->tpl_vars['doituong']->value['ma_cb'];?>
"><?php echo $_smarty_tpl->tpl_vars['doituong']->value['ma_cb'];?>
</a></td>
                    <td><?php echo $_smarty_tpl->tpl_vars['doituong']->value['hoten_cb'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['doituong']->value['diachi_cb'];?>
</td>
                    <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['doituong']->value['ngaysinh_cb'],'%d/%m/%Y');?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['doituong']->value['sdt_cb'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['doituong']->value['email_cb'];?>
</td>
                </tr>
            <?php } ?>
            <?php if ($_smarty_tpl->tpl_vars['page']->value>1){?>
            <tr>
                <td colspan="6">
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
<?php $_tmp1=ob_get_clean();?><?php  $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['i']->value = 1;
  if ($_smarty_tpl->tpl_vars['i']->value<=$_tmp1){ for ($_foo=true;$_smarty_tpl->tpl_vars['i']->value<=$_tmp1; $_smarty_tpl->tpl_vars['i']->value++){
?>
                        <?php if ($_smarty_tpl->tpl_vars['hientai']->value!=$_smarty_tpl->tpl_vars['i']->value){?>
                            <a href='<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&start=<?php echo $_smarty_tpl->tpl_vars['hien']->value*($_smarty_tpl->tpl_vars['i']->value-1);?>
&page=<?php echo $_smarty_tpl->tpl_vars['page']->value;?>
'>| <?php echo $_smarty_tpl->tpl_vars['i']->value;?>
 |</a>
                        <?php }else{ ?>
                            <font color=red>|<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
|</font>
                        <?php }?>
                    <?php }} ?>                    
                </td>
            </tr>
            <?php }?>
            </table>
        </form>
 
<!------------- KẾT THÚC NỘI DUNG TRANG----------------------------------------------------------------------------------------------------------------->                  
		</div> <!-- End .content-box-content -->
	</div> <!-- End .content-box -->
<?php }} ?>